<?php
namespace app\manage\validate;

use think\Validate;

class AuthRule extends Validate
{
    protected $rule = [
        'title'=>'require|unique:auth_rule|length:2,10',
        'name'=>'require|unique:auth_rule',
    ];

    protected $message  =   [
        'title.require' => '权限名称不能为空',
        'name.require' => '权限地址不能为空',
        'title.unique' => '权限名称不能重复',
        'name.unique' => '权限地址不能重复',
        'title.length' => '权限名称2-10位',
    ];
}